from rest_framework import serializers
from .models import *

class UserSers(serializers.ModelSerializer):
    class Meta:
        model=UserModel
        fields='__all__'

class TeacherSers(serializers.ModelSerializer):
    class Meta:
        model=TeacherModel
        fields='__all__'

class StudySers(serializers.ModelSerializer):
    class Meta:
        model=StudyModel
        fields='__all__'

class TimeSers(serializers.ModelSerializer):
    user=UserSers()
    teacher=TeacherSers()

    class Meta:
        model=TimeModel
        fields='__all__'

class Time2Sers(serializers.ModelSerializer):
    user=UserSers()
    study=StudySers()

    class Meta:
        model=Time2Model
        fields='__all__'